/* -----------------------------------------------------------------------
 *   Copyright (C) 2008 by Denjs
 *   dplsoft@pisem.net
 *   http://qdroid.berlios.de
 * -----------------------------------------------------------------------
 *   This program is free software licensed under GNU GPL License v.2 ; see main.cpp fo details
 *   Эта программа является свободным программным обеспечением; распространяемым под
 *   лицензией GNU General Public License v.2 (УНИВЕРСАЛЬНАЯ ОБЩЕСТВЕННАЯ ЛИЦЕНЗИЯ GNU версия 2.0) 
 * ----------------------------------------------------------------------- */
/*
 * t_TreeWidgetItem.cpp
 *
 *  Created on: 28.11.2008
 *      Author: Denjs
 */

#include "t_TreeWidgetItem.h"
//============================================================

t_TreeWidgetItem::t_TreeWidgetItem(QObject *parent)
		: t_AbstractQDroidBot(parent)
{

}
//============================================================
// needs to have ability to be included to QList
t_TreeWidgetItem::t_TreeWidgetItem(const t_TreeWidgetItem &other)// needs to be included to QList
{
	//qDebug()<<"t_TreeWidgetItemElement::t_TreeWidgetItemElement(t_TreeWidgetItemElement&):[0020]: other.Note1_inc =" << other.Note1_inc;
//	this->FileList.clear(); this->FileList+=(other.FileList);
//	this->CurrentElementCopy=other.CurrentElementCopy;

}
/**/

//============================================================
// needs to be included to QList
t_TreeWidgetItem& t_TreeWidgetItem::operator=(const t_TreeWidgetItem &other)
{
	//qDebug()<<"t_TreeWidgetItemElement::operator=:[0033]: other.Note1_inc =" << other.Note1_inc;
//	this->FileList.clear();
//	this->FileList+=(other.FileList);
//	this->CurrentElementCopy=other.CurrentElementCopy;

	return *this;
}

//============================================================
/* virtual function to be redefined to make real class */
QString t_TreeWidgetItem::std_in(QString Message)
{

	return "ok";
}


//===========================================================================
/* virtual function to be redefined to make real class */
t_TreeWidgetItem* t_TreeWidgetItem::copy()
{
	t_TreeWidgetItem *El;
	El=new t_TreeWidgetItem();
	*El=*this;
	return El;
}


//===========================================================================
int t_TreeWidgetItem::set_qwidgetitem(QTreeWidgetItem *_CoreQTreeWidgetItem)
{
	CoreQTreeWidgetItem=_CoreQTreeWidgetItem;
	return 0;
};

//===========================================================================
// оболочка
int t_TreeWidgetItem::add_child(t_TreeWidgetItem *_NewChild)
{
	this->CoreQTreeWidgetItem->addChild(_NewChild->CoreQTreeWidgetItem);
	return 0;
}

//============================================================================
// оболочка для text()
QString t_TreeWidgetItem::get_text(int _Column)
{
	return this->CoreQTreeWidgetItem->text(_Column);
}

//============================================================================
// оболочка для setText()
int t_TreeWidgetItem::set_text(int _Column, QString _Text)
{
	this->CoreQTreeWidgetItem->setText(_Column,_Text);
	return 0;
}

//============================================================================
int t_TreeWidgetItem::set_column_background(int _Column,QString _RRGGBBColorString)
{

	QBrush Brush=QBrush(QColor(_RRGGBBColorString));
	this->CoreQTreeWidgetItem->setBackground(_Column, Brush);
	return 0;
}
